package xin.marcher.wind.process.demo;

import xin.marcher.wind.process.processor.AbstractRollbackProcessor;
import xin.marcher.wind.process.processor.ProcessContext;

/**
 * @author marcher
 */
public class RollbackProcessorThrowExceptionDemo extends AbstractRollbackProcessor {

    @Override
    protected void processInternal(ProcessContext context) {
        System.out.println(Thread.currentThread().getName() + " - RollbackProcessorThrowExceptionDemo " + context.get("id"));
        int i = 1 / 0;
    }

    @Override
    protected void rollback(ProcessContext context) {
        System.out.println("rollback RollbackProcessorThrowExceptionDemo " + context.get("id"));
    }
}